package de.zainodis.commons.quickaction;

import android.graphics.drawable.Drawable;
import android.graphics.Bitmap;

/**
 * Action item, displayed as menu with icon and text.
 * 
 * @author Lorensius. W. L. T <lorenz@londatiga.net>
 * 
 *         Contributors: - Kevin Peck <kevinwpeck@gmail.com>
 * 
 */
public class ActionItem {
   private Drawable icon;
   private Bitmap thumb;
   private String title;
   private int actionId = -1;
   private boolean selected;
   private boolean sticky;

   public ActionItem(int actionId, String title, Drawable icon) {
	 this.title = title;
	 this.icon = icon;
	 this.actionId = actionId;
   }

   public ActionItem() {
	 this(-1, null, null);
   }

   public ActionItem(int actionId, String title) {
	 this(actionId, title, null);
   }

   public ActionItem(Drawable icon) {
	 this(-1, null, icon);
   }

   public ActionItem(int actionId, Drawable icon) {
	 this(actionId, null, icon);
   }

   public void setTitle(String title) {
	 this.title = title;
   }

   public String getTitle() {
	 return this.title;
   }

   public void setIcon(Drawable icon) {
	 this.icon = icon;
   }

   public Drawable getIcon() {
	 return this.icon;
   }

   public void setActionId(int actionId) {
	 this.actionId = actionId;
   }

   public int getActionId() {
	 return actionId;
   }

   /**
    * Set sticky status of button
    * 
    * @param sticky
    *           true for sticky, pop up sends event but does not disappear
    */
   public void setSticky(boolean sticky) {
	 this.sticky = sticky;
   }

   public boolean isSticky() {
	 return sticky;
   }

   public void setSelected(boolean selected) {
	 this.selected = selected;
   }

   public boolean isSelected() {
	 return this.selected;
   }

   public void setThumb(Bitmap thumb) {
	 this.thumb = thumb;
   }

   public Bitmap getThumb() {
	 return this.thumb;
   }
}